################################################################################
# Copyright (C) 2014 Jeremy Brodt and Kevin Gillespie
# $Id: Makefile 51 2014-05-02 19:55:21Z brodtj1212@gmail.com $
################################################################################

# This is the name of the build output file
PROJECT=car

# Specify the target processor
TARGET=MAX32550

# Select 'GCC' or 'IAR' compiler
COMPILER=GCC

# Increase heap size
HEAP_SIZE=8192

# This is the path to the CMSIS root directory
CMSIS_ROOT=../../Libraries/CMSIS

# Source files for this test (add path to VPATH below)
SRCS  = main.c
SRCS += userif.c
SRCS += compass.c
SRCS += motor.c
SRCS += encoder.c
SRCS += libc_stubs.c

# Where to find source files for this test
VPATH  = ./src

# Where to find header files for this test
IPATH  = ./src

# Use this variables to specify and alternate tool path
#TOOL_DIR=/opt/gcc-arm-none-eabi-4_8-2013q4/bin

# Use these variables to add project specific tool options
#PROJ_CFLAGS+=--specs=nano.specs
#PROJ_LDFLAGS+=--specs=nano.specs

# Point this variable to a startup file to override the default file
#STARTUPFILE=start.S

# Point this variable to a linker file to override the default file
#LINKERFILE=$(CMSIS_ROOT)/Device/Maxim/MAX32550/Source/GCC/max32550_ram.ld

################################################################################
# Include external library makefiles here

# Include the BSP
BSP_DIR=../../Libraries/BSP/MAX32550_KIT_V1P0
#BSP_DIR=../../Libraries/BSP/MAX32550_KIT_V2P0
include $(BSP_DIR)/bsp.mk

# Include the Peripheral Driver Library
PERIPH_DRIVER_DIR=../../Libraries/MAX32550PeriphDriver
include ${PERIPH_DRIVER_DIR}/periphdriver.mk

# Include the RTOS
RTOS_DIR=../../Libraries/FreeRTOS
RTOS_CONFIG_DIR=src
include ${RTOS_DIR}/freertos.mk

################################################################################
# Include the rules for building for this target. All other makefiles should be
# included before this one.
TARGET_UC:=$(shell echo $(TARGET) | tr a-z A-Z)
TARGET_LC:=$(shell echo $(TARGET) | tr A-Z a-z)
include $(CMSIS_ROOT)/Device/Maxim/$(TARGET_UC)/Source/$(COMPILER)/$(TARGET_LC).mk

